package com.laolei.feign.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.laolei.feign.model.YoudaoRelust;

@FeignClient(decode404 = false, url = "http://fanyi.youdao.com", name = "youdao" )
public interface YoudaoApi {

	@RequestMapping(method = RequestMethod.GET, path = "/openapi.do?version=1.1" ,produces=MediaType.APPLICATION_JSON_UTF8_VALUE )
	YoudaoRelust fanyi(@RequestParam(name = "q") String query, @RequestParam(name = "keyfrom") String keyfrom, @RequestParam(name = "key") String key, @RequestParam(name = "type") String type, @RequestParam(name = "doctype") String doctype);

}
